import { Global, Module } from '@nestjs/common';
import { MyLogger } from 'src/my-logger';
@Global()
@Module({
  providers: [
    {
      provide: 'LOGGER_CONFIG',
      useValue: { enable: true },
    },
    MyLogger,
  ],
})
export class LoggerModule {
  static forRoot(): any {
    return {
      module: LoggerModule,
      providers: [MyLogger],
      exports: [MyLogger],
    };
  }
}
